home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / amigadoslibrary / execute.c < prev    next >
C/C++ Source or Header  |  1996-10-10  |  707b  |  32 lines

  1. /* Execute.c   V1.0   93-09-26                        */
  2. /* ROM library: "dos.library/Execute", (All versions) */
  3. /* Copyright 1993, Anders Bjerin, Amiga C Club        */
  4.  
  5. #include <dos/dos.h>
  6.  
  7. #include <clib/dos_protos.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10.  
  11. UBYTE *version = "$VER: Execute 1.0";
  12.  
  13. int main( int argc, char *argv[] );
  14. int main( int argc, char *argv[] )
  15. {
  16.   /* Store the result code here: */
  17.   BOOL ok;
  18.  
  19.   
  20.   /* Execute the "Shell" command "Copy": */
  21.   ok = Execute( "C:Copy C:Dir to RAM:", NULL, NULL );
  22.  
  23.   /* OK? */
  24.   if( ok )
  25.     printf( "The \"Shell\" command was successfully executed!\n" );
  26.   else
  27.     printf( "Error! Could not execute the \"Shell\" command!\n" );
  28.  
  29.   exit( 0 );
  30. }
  31.  
  32.